home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 9 / QRZ Ham Radio Callsign Database - Volume 9.iso / mac / files / p_term / ad16dis.exe / TNC1DED.DOC < prev    next >
Text File  |  1989-08-09  |  35KB  |  714 lines

  1.                          AX.25 Version 2
  2.                           Multi-channel
  3.                           TNC  FIRMWARE
  4.                           (version 1.3)
  5.  
  6.             Copyright 1987, Ronald E. Raikes (WA8DED)
  7.      This firmware supports the full AX.25  link-layer  protocol,
  8. version 2.0 as described in the ARRL specification dated  October
  9. 1984,  as  well  as   the   pre-existing   version   1.x.    This
  10. implementation supports multiple  simultaneous  link  connections
  11. with either version protocol.  This release  has  been  assembled
  12. for a maximum of four connections, although any reasonable number
  13. of connections is possible by changing one MAXLNK symbol  in  the
  14. source equate file.
  15.      The firmware  is  contained  in  two  2764  EPROMs,  and  is
  16. intended to be installed in a TAPR TNC-1 (or equivalent, such  as
  17. the AEA PKT-1 or Heath HD-4040) in sockets  U11  (C000)  and  U12
  18. (E000).  This assumes that a 6264 RAM  is  already  installed  in
  19. socket U7, with additional  6264  RAMs  optionally  installed  in
  20. sockets U8, U9, and U10 in any combination (verify that pin 26 is
  21. connected to +5v).  Additional RAM is highly desirable if  multi-
  22. channel or unattended operation is anticipated.  When  installing
  23. the EPROMs (including newer versions), it will  be  necessary  to
  24. start the tnc with the PARAMETER SOURCE switch set  to  the  PROM
  25. position.  This will cause default parameters to be written  into
  26. NOVRAM  memory  but  not  PERMed.   The  RS-232  port   will   be
  27. initialized to 300  baud  with  xon/xoff  handshaking.   The  tnc
  28. source call sign will be all blanks, and should be set  with  the
  29. 'I' command, as well as any other default parameters  that  might
  30. need changing, before issuing a 'PERM' command.  At  this  point,
  31. the PARAMETER SOURCE switch may be set to NOVRAM  for  subsequent
  32. operation.  If the terminal baud rate has been changed,  the  new
  33. value will take effect following a reset.  If the tnc source call
  34. sign is left blank, the tnc will not activate the transmitter PTT
  35. line.
  36.  
  37.      Commands and information are sent to the tnc in the form  of
  38. lines.  Lines may be up to 256  characters  long,  including  the
  39. terminating CARRIAGE RETURN.  If the 256th character  entered  is
  40. not a CARRIAGE RETURN, it will be discarded and a BELL  character
  41. will be output to the terminal.  BACKSPACE and DELETE may be used
  42. to remove single characters from the line.  The entire  line  may
  43. be permanently backspaced out by entering a CONTROL-U or CONTROL-
  44. X.  A CONTROL-R will temporarily backspace out any  partial  line
  45. to allow incoming frames to be  displayed.   A  second  CONTROL-R
  46. will then restore  the  line  to  allow  continuation  of  entry.
  47. During the time a partial line is saved, only  another  CONTROL-R
  48. will be  accepted  from  the  keyboard  (with  the  exception  of
  49. xon/xoff, of course).  BELL characters are echoed to the terminal
  50. when entered or  removed.   Lines  which  begin  with  an  ESCAPE
  51. character (echoed as '* ') are interpreted  as  commands.   If  a
  52. command is issued with no parameter, the current  value  of  that
  53. commands parameter is displayed.  An embedded NULL character in a
  54. command will cause the remainder  of  the  line  to  be  ignored.
  55. Lines without a leading ESCAPE character are sent as information.
  56.  
  57.      The firmware provides the operator  with  five  virtual  tnc
  58. channels, numbered 0 to 4.  The terminal is logically attached to
  59. only one of these  channels  at  a  time,  selected  by  the  'S'
  60. command.  Information sent on channel 0 is always  unproto.   The
  61. unproto path may be set by issuing a 'C' command when  channel  0
  62. is selected.  Channels 1 - 4 are also unproto  if  they  are  not
  63. currently connected.  Outgoing connect requests may be issued  on
  64. any unconnected channel, while incoming connect requests will use
  65. the first available  channel  (provided  the  maximum  number  of
  66. connections set  by  the  'Y'  command  will  not  be  exceeded).
  67. Information received on a connected channel that is not currently
  68. selected will remain queued there until that channel is  selected
  69. (the 'L' command is useful in determining if there is information
  70. waiting on other channels).  Information for transmission is sent
  71. only to the currently selected channel.   When  a  connection  is
  72. ended,  any  information  that  has  not  been   transmitted   or
  73. acknowledged will be discarded.  Received information will remain
  74. queued,  however,  until  it  has  been  displayed.   If  a   new
  75. digipeater  path  is  desired  while  a   connection   is   being
  76. established or is in progress, it is not necessary to  disconnect
  77. first.  Simply re-issuing the 'C' command will  re-establish  the
  78. connection via the new path  without  any  loss  of  information.
  79. Attempting to connect to  the  same  station  on  more  than  one
  80. channel is not permitted.
  81.  
  82.      Which protocol version is used to initiate a  connection  is
  83. controlled by the 'V' command, but the version  will  be  changed
  84. automatically, if necessary, to conform to the version of the tnc
  85. responding.  Version 2 protocol is more  effecient  in  terms  of
  86. network  throughput  and   loading,   especially   under   severe
  87. conditions.  Version 2 protocol is the default and should be used
  88. whenever possible.  (NOTE:  The  existing  firmware  supplied  by
  89. TAPR for the TNC-1 (v3.x) will NOT digipeat version  2  protocol.
  90. This is expected to  remedied  in  v4.0.   All  other  tnc's  and
  91. digipeaters encountered to date  digipeat  version  2  properly.)
  92. When version 2 protocol is used, a  watch-dog  timer  is  started
  93. whenever information  is  not  being  transmitted.   If  the  tnc
  94. remains idle for three minutes, it will poll  the  other  tnc  to
  95. determine if the link is still established.  If  no  response  is
  96. received after the number of tries set by the  'N'  command,  the
  97. tnc will attempt to re-establish the connection.  This  procedure
  98. will also detect the case where someone connects and then  leaves
  99. without disconnecting.  Changing the protocol  version  during  a
  100. connection is not permitted.
  101.  
  102.      The 'F', 'N', 'O',  and  'V'  commands  maintain  individual
  103. parameters for each channel.  The value stored in  channel  0  is
  104. the value that is  saved  in  NOVRAM.   This  value  is  used  to
  105. initialize channels 1 - 4 after a  reset,  and  to  re-initialize
  106. channels 1 - 4 after a disconnect.  This allows the values to  be
  107. changed independently on each channel,  prior  to  and  during  a
  108. connection, and then automatically revert back  to  the  standard
  109. values when the connection is ended.  A 'D' command issued  on  a
  110. disconnected channel 1 - 4 will also re-initialize that channel.
  111.  
  112.      Frame monitoring is controlled  by  the  'M'  command.   The
  113. command parameter determines the types of frames  monitored,  and
  114. is a list of desired  frames  chosen  from  the  letters  in  the
  115. following table:
  116.      LTR       FRAME
  117.      ---       -----
  118.       N        None
  119.       I        I frames
  120.       U        UI frames
  121.       S        Supervisory frames
  122.       C        Monitor while connected
  123.       R        Monitor received frames (addressed to)
  124.       T        Monitor transmitted frames (addressed from)
  125.       +        Call signs to be included (maximum of 8)
  126.       -        Call signs to be excluded (maximum of 8)
  127.  
  128. The '+' and '-' parameters may not be used together.   If  either
  129. is used, it must be the last parameter (followed by one to  eight
  130. call signs,  if  applicable).   If  no  list  of  call  signs  is
  131. specified to be included or excluded,  all  call  signs  will  be
  132. candidates for monitoring.  Entering a '+' or '-'  with  no  call
  133. signs will empty the list.
  134.  
  135. An asterisk displayed after a call sign in  the  digipeater  list
  136. indicates the frame was transmitted by that station.  The control
  137. field displayed will be one of the following:
  138.  
  139.      NAME   DESCRIPTION
  140.      ----   -----------
  141.      RRa  - Receive Ready
  142.      RNRa - Receive Not Ready
  143.      REJa - Reject
  144.      UI   - Unnumbered Information
  145.      DM   - Disconnected Mode
  146.      SABM - Connect Request
  147.      DISC - Disconnect Request
  148.      UA   - Unnumbered Acknowledge
  149.      FRMR - Frame Reject
  150.      Iab  - Information
  151.      ?ccH - Unknown
  152.      a  = Next expected frame number (0 - 7)
  153.      b  = Frame number of this frame (0 - 7)
  154.      cc = Hexadecimal value
  155.  
  156. In addition, one of the following characters will  be  displayed,
  157. reflecting the protocol version, command/response bits,  and  the
  158. poll/final bit:
  159.  (blank) = version 1 frame without poll/final bit
  160.        ! = version 1 frame with poll/final bit
  161.        ^ = version 2 command frame without poll bit
  162.        + = version 2 command frame with poll bit
  163.        - = version 2 response frame with final bit
  164.        v = version 2 response frame without final bit
  165.  
  166. The protocol identifier field is displayed in hexadecimal,  which
  167. is currently  always  an  F0,  signifying  that  no  layer  3  is
  168. implemented.
  169.  
  170.      An unattended mode, controlled by the 'U' command,  provides
  171. for sending user supplied text to a connecting station, and  then
  172. allows that station to leave a  brief  message.   This  mode  can
  173. operate on all channels simultaneously, but in no way limits  the
  174. operators ability to interact with one of the connected  channels
  175. or  the  ability  to  make  outgoing  connect   requests.    When
  176. unattended mode is enabled, link status messages  are  queued  to
  177. the associated channel and not output to the terminal unless that
  178. channel  is  currently  selected.   Link  status  messages   will
  179. therefore  be  displayed  in   chronological   order   with   the
  180. information from that channel.  In addition, text supplied by the
  181. user with the 'U' command  will  be  sent  to  any  station  that
  182. connects.  If channel 0  is  left  selected,  stations  may  then
  183. connect and leave messages on channels 1 - 4 (limited by the  'Y'
  184. parameter, of course).  The 'L' command may be used to  determine
  185. if messages have been left on any channel.  Selecting  a  channel
  186. containing messages will cause all link  status  and  information
  187. from that channel to be displayed.  If  xon/xoff  handshaking  is
  188. enabled, CONTROL-S and CONTROL-Q may  be  used  to  regulate  the
  189. output to  the  terminal  to  allow  comfortable  reading.   Also
  190. provided,  but  intended  to  be  used  very  sparingly,  is   an
  191. unattended QST facility.  In this mode, user supplied text may be
  192. automatically transmitted unproto to the path set on  channel  0,
  193. at periodic intervals spaced  1  -  65,535  minutes  apart.   The
  194. interval and text must be entered each time QST mode is  enabled.
  195. Use of unattended QST messages is generally degrading to  network
  196. performance and is considered by many to  be  an  annoyance,  and
  197. should only be used when absolutely necessary.
  198.  
  199.      The tnc parallel port supplies link status  information  for
  200. channel 1 on lines PA0, PA1, and PA2 for  use  with  an  external
  201. status indicator.  The following link states are possible:
  202.                     1 = Disconnected
  203.                     2 = Link Setup
  204.                     3 = Frame Reject
  205.                     4 = Disconnect Request
  206.                     5 = Information Transfer
  207.  
  208.      The firmware source is written in  6809  assembly  language.
  209. Emphasis was  placed  on  using  a  state  table  driven  design,
  210. utilizing the state tables provided in  the  ARRL  specification.
  211. The source was assembled using a 6809 cross assembler  from  2500
  212. AD Software running on a Z-80/8086  TurboDOS  development  system
  213. (CP/M & MS-DOS compatable).
  214.  
  215. NOTE:   A  very  small  number  of  Western  Digital  1933   HDLC
  216. Controller ICs manufactured in 1981 and 1982 have been  found  to
  217. be defective.  The symptoms are erratic and unreliable  operation
  218. of the tnc, due to the hdlc controller  occasionally  failing  to
  219. interrupt  upon  successful  completion  of  frame  transmission.
  220. These defective parts can be identified by  inspecting  the  mask
  221. number on the underneath side of  the  IC.   The  defective  mask
  222. number begins with the letters 'BA', and should be replaced.  The
  223. current replacement part is called 1935 and requires no changes.
  224.  
  225.                          COMMAND SUMMARY
  226.                          ===============
  227. COMMAND        PARAMETER               DESCRIPTION
  228. -------        ---------               -----------
  229.   A (1)            0             Auto linefeed disabled
  230.                    1             Auto linefeed enabled
  231.   B (6)           1-15           Terminal baud rate
  232.   C        Cs1 [Cs2 ... Cs9]     Connect path (0=unproto path)
  233.   D                              Disconnect
  234.   E (1)            0             Echo input disabled
  235.                    1             Echo input enabled
  236. * F (3)           1-15           Frame acknowledge (seconds)
  237.   G               [0]            Get information (host mode)
  238.                   [1]            Get link status (host mode)
  239.   H (1200)       50-9600         HDLC baud rate
  240.   I                Cs            Tnc source call sign
  241.   JHOST (0)        0             Terminal mode enabled
  242.                    1             Host mode enabled
  243.   K               1-2            Calibrate
  244.   L              [0-4]           Display channel status
  245.   M (IU)       NIUSCRT+-         Monitor mode
  246. * N (10)          0-255          Number of tries (0=forever)
  247. * O (4)           1-7            Number of outstanding I frames
  248.   PERM                           Save parameters to NOVRAM
  249.   QRES                           Re-start firmware
  250.   R (1)            0             Repeater disabled
  251.                    1             Repeater enabled
  252.   S (1)           0-4            Select channel (0=unproto)
  253.   T (30)          0-127          Transmitter delay (10ms)
  254.   U (0)   0      [text]          Unattended mode disabled
  255.           1      [text]          Unattended mode enabled
  256.           2    interval  text    QST mode enabled
  257. * V (2)            1             Version 1 protocol initiated
  258.                    2             Version 2 protocol initiated
  259.   W (16)          0-127          Repeater wait (10ms)
  260.   X (1)            0             Transmitter PTT disabled
  261.                    1             Transmitter PTT enabled
  262.   Y (1)           0-4            Maximum connections
  263.   Z (3)            0             Flow disabled, xon/off disabled
  264.                    1             Flow enabled, xon/off disabled
  265.                    2             Flow disabled, xon/off enabled
  266.                    3             Flow enabled, xon/off enabled
  267.   @   B                          Display number of free buffers
  268.       C  (0)       0             Fast clock disabled
  269.                    1             Fast clock enabled
  270.       D  (0)       0             Full duplex disabled
  271.                    1             Full duplex enabled
  272.       P  (F0)     0-FF           Protocol id (hex)
  273.       S                          Display current link state
  274.       T2 (100)    0-255          Timer T2 interval (10ms)
  275.       T3 (18000)  0-32767        Timer T3 interval (10ms)
  276.    Default values are shown in parenthesis
  277. *  These commands are applicable to each connection channel
  278.      (Values set on channel 0 are used after a reset and
  279.       disconnect to initialize each connection channel)
  280.  
  281.                        COMMAND DESCRIPTION
  282.                        ===================
  283.      The 'A' command is used to enable or disable  the  automatic
  284. insertion of LINEFEED characters after CARRIAGE RETURN characters
  285. to the terminal.  This parameter is stored in NOVRAM.
  286.      The 'B' command is used to set the terminal baud rate, using
  287. one of the following parameters:
  288.      Parameter     Baud rate
  289.      ---------     ---------
  290.          1            50
  291.          2            75
  292.          3            110
  293.          4            135
  294.          5            150
  295.          6            300
  296.          7            600
  297.          8            1200
  298.          9            1800
  299.         10            2400
  300.         11            3600
  301.         12            4800
  302.         13            7200
  303.         14            9600
  304.         15            19200
  305.  
  306. After setting the baud rate with the 'B' command, the value  must
  307. be PERMed, and will then take effect  following  a  reset.   Baud
  308. rates above  4800  may  not  be  reliable  with  sustained  input
  309. (commands or information) from a host computer due  to  the  slow
  310. cpu clock rate and non-vectored interrupt architecture.
  311.  
  312.      The 'C' command is used to initiate a link connection.  Note
  313. that NO 'v' or 'via' is used between the  destination  call  sign
  314. and the digipeater call signs.  A 'C' command may be issued on  a
  315. channel already in use to change the digipeater call  signs,  but
  316. not the destination call sign.  A 'C' command issued when channel
  317. 0 is selected sets the unproto path.  Attempting  to  connect  to
  318. the same station on more than one channel is not permitted.
  319.  
  320.      The 'D' command is used to initiate a link disconnection.  A
  321. 'D' command issued during the establishment or  dis-establishment
  322. of a link will cause an  immediate  return  to  the  disconnected
  323. state.  A 'D' command issued on a disconnected channel  will  re-
  324. initialize the connection  dependent  parameters  to  the  values
  325. stored in channel 0.
  326.  
  327.      The 'E' command is used to enable or disable the echoing  of
  328. input (commands and information) to the terminal.  This parameter
  329. is stored in NOVRAM.
  330.  
  331.      The 'F' command is used to  set  the  frame  acknowledgement
  332. interval.  This interval is used to compute the timeout  interval
  333. before a packet is retransmitted, using the formula:
  334.      time (seconds) = frame ack * (2 * number of digipeaters + 1)
  335. A separate frame acknowlegement interval value is maintained  for
  336. each connection channel.  The value stored in channel 0  is  used
  337. to  initialize  each  connection  channel  after   a   reset   or
  338. disconnection, and is the value that is stored in NOVRAM.
  339.  
  340.      The 'G' command is used to interrogate virtual tnc  channels
  341. when host mode is enabled.  If no  parameter  is  specified,  the
  342. next chronological item (information  or  link  status)  will  be
  343. returned, provided there is one.   This  command  is  invalid  in
  344. terminal  mode.   A  later  section  is  devoted  to  host   mode
  345. operation.
  346.  
  347.      The 'H' command is used to set the  HDLC  baud  rate.   Non-
  348. standard values are rounded down to the next possible baud  rate.
  349. In this case, use an 'H' command with no paramter to display  the
  350. value actually set.  This parameter is stored  in  NOVRAM.   HDLC
  351. rates up to 9600 baud are supported if the  fast  clock  mode  is
  352. enabled.
  353.  
  354.      The 'I' command is used to set the  tnc  source  call  sign.
  355. The initial value is all blanks.  After the source call sign  has
  356. been entered, the 'PERM' command should be used to  save  it  for
  357. use during subsequent operation.  Changing the  tnc  source  call
  358. sign while connected is not permitted.  If the  tnc  source  call
  359. sign is left blank, the tnc will not activate the transmitter PTT
  360. line.
  361.  
  362.      The 'JHOST' command is used to select between  terminal  and
  363. host modes.  A later section is devoted to host mode operation.
  364.  
  365.      The 'K' command is used to calibrate  the  tnc  modem.   The
  366. following parameters set the calibration modes listed:
  367.      Parameter         Calibration
  368.      ---------         -----------
  369.          1          FREQUENCY COUNTER
  370.          2          TONE LEVEL & NULL
  371. The frequency counter mode will display the measured  frequencies
  372. on the terminal.  When each mode is  selected,  jumpers  settings
  373. are displayed as well as the appropriate ajustment  points.   The
  374. values shown in parenthesis are the normal targets for 1200  baud
  375. operation.
  376.  
  377.      The 'L' command is used to display the link status of one or
  378. all channels.   Information  displayed  includes  the  connection
  379. path, number of receive frames not yet displayed, number of  send
  380. frames not yet transmitted, number of transmitted frames not  yet
  381. acknowledged, and the  current  retry  count.   A  '+'  character
  382. preceeding the channel number indicates  the  currently  selected
  383. channel.  Operation of this command when host mode is enabled  is
  384. somewhat different, and is described in a later section.
  385.  
  386.      The 'M' command is used to set the  frame  monitoring  mode.
  387. The command parameter determines the types of  frames  monitored,
  388. and is a list of desired frames chosen from the  letters  in  the
  389. following table:
  390.      LTR       FRAME
  391.      ---       -----
  392.       N        None
  393.       I        I frames
  394.       U        UI frames
  395.       S        Supervisory frames
  396.       C        Monitor while connected
  397.       R        Monitor received frames (addressed to)
  398.       T        Monitor transmitted frames (addressed from)
  399.       +        Call signs to be included (maximum of 8)
  400.       -        Call signs to be excluded (maximum of 8)
  401. The '+' and '-' parameters may not be used together.   If  either
  402. is used, it must be the last parameter (followed by one to  eight
  403. call signs,  if  applicable).   If  no  list  of  call  signs  is
  404. specified to be included or excluded,  all  call  signs  will  be
  405. candidates for monitoring.  Entering a '+' or '-'  with  no  call
  406. signs will empty the list.  This parameter is stored in NOVRAM.
  407.  
  408.      The 'N' command is used to set the maximum number of times a
  409. frame  will  be  transmitted  without  receiving  an  appropriate
  410. acknowledgement, before a link failure is  assumed.   A  separate
  411. maximum number of tries value is maintained for  each  connection
  412. channel.  The value stored in channel 0  is  used  to  initialize
  413. each connection channel after a reset or  disconnection,  and  is
  414. the value that is stored in NOVRAM.
  415.  
  416.      The 'O' command  is  used  to  set  the  maximum  number  of
  417. unacknowledged I frames that may be outstanding at any one  time.
  418. A separate maximum number of unacknowledged  I  frames  value  is
  419. maintained for each connection  channel.   The  value  stored  in
  420. channel 0 is used to initialize each connection channel  after  a
  421. reset or disconnection, and  is  the  value  that  is  stored  in
  422. NOVRAM.
  423.  
  424.      The 'PERM' command is used to change  the  parameter  values
  425. stored in NOVRAM to those that are currently set.
  426.  
  427.      The 'QRES' command is used to restart the firmware as  if  a
  428. hardware reset had been issued.
  429.  
  430.      The 'R' command is used to enable or disable the digipeating
  431. of frames.  This parameter is stored in NOVRAM.
  432.  
  433.      The 'S' command  is  used  to  select  the  current  channel
  434. number.  This parameter is stored in NOVRAM.
  435.  
  436.      The 'T' command is used to set the transmitter  keyup  delay
  437. interval.  The parameter is specified in 10ms  increments.   This
  438. parameter is stored in NOVRAM.
  439.  
  440.      The 'U' command is used  to  enable  or  disable  unattended
  441. modes.  If QST mode is not used, previously entered text will  be
  442. retained if new text is not provided.  If QST mode  is  selected,
  443. the interval and text must be  supplied.   The  QST  interval  is
  444. specified in minutes from 1 - 65,535.
  445.  
  446.      The 'V' command is used to select whether  version  1  or  2
  447. protocol will be used to initiate a link connection.  A  separate
  448. protocol version value is maintained for each connection channel.
  449. The value  stored  in  channel  0  is  used  to  initialize  each
  450. connection channel after a reset or  disconnection,  and  is  the
  451. value that is stored in  NOVRAM.   Interrogating  this  parameter
  452. during a connection will reflect the protocol  version  currently
  453. being used on that channel.  Changing the protocol version during
  454. a connection is not permitted.
  455.  
  456.      The 'W' command is used to set the digipeater wait interval.
  457. The parameter is specified in 10ms increments.  This parameter is
  458. stored in NOVRAM.
  459.  
  460.      The 'X' command is used to enable or disable the transmitter
  461. PTT line.  This parameter is stored in NOVRAM.
  462.  
  463.      The 'Y' command  is  used  to  set  the  maximum  number  of
  464. connections that may  established  by  incoming  requests.   This
  465. command has no  effect  on  the  operators  ability  to  initiate
  466. outgoing  connection  requests.   This  parameter  is  stored  in
  467. NOVRAM.
  468.  
  469.      The 'Z' command is used to enable or  disable  flow  control
  470. and xon/xoff handshaking to the terminal.   If  flow  control  is
  471. enabled, output to the terminal will be inhibited while  entering
  472. commands or information.  If flow control is disabled, output  to
  473. the terminal will not be restricted.  Flow control  and  xon/xoff
  474. handshaking should be disabled during periods in which the tnc is
  475. operated without a terminal, to  avoid  suspending  output  which
  476. will consume buffers.  If xon/xoff handshaking  is  enabled,  crt
  477. scrolling may be stopped and started using CONTROL-S and CONTROL-
  478. Q characters.  Flow control  and  xon/xoff  handshaking  are  not
  479. performed when host mode is enabled.  This parameter is stored in
  480. NOVRAM.
  481.  
  482.      The '@'  command  is  a  software  maintenance  command.   A
  483. parameter of 'B' will display the  number  of  free  buffers.   A
  484. parameter of 'C0' will select timing parameters  for  the  slower
  485. cpu  clock  rate.   A  parameter  of  'C1'  will  select   timing
  486. parameters for the faster cpu clock rate.  A  parameter  of  'D0'
  487. will select simplex operation for the HDLC port.  A parameter  of
  488. 'D1' will select full duplex operation for the HDLC  port.   Both
  489. the 'C' and 'D' parameters are  stored  in  NOVRAM  and  must  be
  490. PERMed if the change is to stay in effect following a reset.  The
  491. 'P' parameter is used to  set  the  protocol  id  byte  for  each
  492. channel  and  is  supplied  and  displayed  in  hexadecimal.    A
  493. parameter of 'S' will display the current link state.   The  'T2'
  494. parameter is used to set the timer T2 interval, just as the  'T3'
  495. parameter is used to  set  the  timer  T3  interval.   The  timer
  496. intervals are specified in 10ms increments, and both  are  stored
  497. in NOVRAM.  Timer T2 controls the amount  of  delay  between  the
  498. time an information frame is received and the time the  resulting
  499. response frame is sent.  This delay allows multiple frames to  be
  500. acknowledged with a single response.  Timer T3 is  used  maintain
  501. link integrity.  If there is no activity during the T3  interval,
  502. the tnc  will  poll  to  verify  the  distant  station  is  still
  503. connected.
  504.  
  505.  
  506.                        HOST MODE OPERATION
  507.                        ===================
  508.      Host mode is intended to provide a user  interface  suitable
  509. for operation under control of a host  processor.   Commands  and
  510. information to the tnc, as well as status  and  information  from
  511. the tnc, are clearly identified to allow orderly and  unambiguous
  512. communication.  To alleviate any need for  hardware  or  software
  513. handshaking,  the  tnc  will  not  send  to  the  host  processor
  514. unsolicited,  and  all  exchanges  are  limited  to  256   bytes.
  515. Information transfers are fully transparent.
  516.  
  517.      When host mode is enabled, the first byte sent  to  the  tnc
  518. must be a channel number.  If  information  is  being  sent,  the
  519. second byte must be a binary 0.  If a command is being sent,  the
  520. second byte must be a binary 1.   The  third  byte  must  be  the
  521. binary length of the actual information or  command,  decremented
  522. by 1 (vacuous information or commands are  not  permitted).   The
  523. actual  information  or   command   bytes   must   follow   last.
  524. Information sent to channel 0 will be sent unproto.   Information
  525. sent to an unconnected channel 1 - 4 will be discarded.  The  tnc
  526. will respond to both information  and  commands  with  a  channel
  527. number first, followed by a binary code of 0, 1, or 2, signalling
  528. success or failure.  Codes of 1 or 2 will be followed by  a  null
  529. terminated message.  Channels may be  interrogated  for  incoming
  530. information or link status by using  the  'G'  command.   Monitor
  531. headers and monitor information will always be sent to channel 0,
  532. along with connect request link status messages.  All other  link
  533. status messages will be sent to the  appropriate  channel,  along
  534. with that channels connected information.  In response to  a  'G'
  535. command, the tnc  will  respond  with  a  channel  number  first,
  536. followed by a binary code of 0 if  nothing  is  available,  or  a
  537. binary code of 3 - 7, identifying the bytes that follow.  A  code
  538. of  4  indicates  the  monitored  frame  does  not   contain   an
  539. information field.  A code of 5  indicates  the  monitored  frame
  540. does contain an information field, and the next  'G'  command  on
  541. channel 0 will return that information field, preceeded by a code
  542. of 6.
  543.  
  544.          Host to Tnc
  545.          -----------
  546. CHANNEL   CODE           DESCRIPTION
  547. -------   ----           -----------
  548.    n       0        Information (preceeded by length-1)
  549.    n       1        Command     (preceeded by length-1)
  550.  
  551.          Tnc to Host
  552.          -----------
  553. CHANNEL   CODE           DESCRIPTION
  554. -------   ----           -----------
  555.    n       0        Success (nothing follows)
  556.    n       1        Success (message follows, null terminated)
  557.    n       2        Failure (message follows, null terminated)
  558.    n       3        Link Status (null terminated)
  559.    n       4        Monitor Header (null terminated)
  560.    n       5        Monitor Header (null terminated)
  561.    n       6        Monitor Information (preceeded by length-1)
  562.    n       7        Connect Information (preceeded by length-1)
  563.  
  564. Success messages
  565. ----------------
  566. {channel status}
  567. {parameter value}
  568. CHANNEL NOT CONNECTED
  569.  
  570. Failure messages
  571. ----------------
  572. INVALID COMMAND
  573. TNC BUSY - LINE IGNORED
  574. CHANNEL ALREADY CONNECTED
  575. STATION ALREADY CONNECTED
  576.  
  577. Link Status messages
  578. --------------------
  579. BUSY fm {call} via {digipeaters}
  580. CONNECTED to {call} via {digipeaters}
  581. LINK RESET fm {call} via {digipeaters}
  582. LINK RESET to {call} via {digipeaters}
  583. DISCONNECTED fm {call} via {digipeaters}
  584. LINK FAILURE with {call} via {digipeaters}
  585. CONNECT REQUEST fm {call} via {digipeaters}
  586. FRAME REJECT (x y z) fm {call} via {digipeaters}
  587. FRAME REJECT (x y z) to {call} via {digipeaters}
  588. x y z = FRMR information bytes
  589.  
  590. Monitor Header format
  591. ---------------------
  592. fm {call} to {call} via {digipeaters} ctl {name} pid {hex}
  593.  
  594. Channel Status format
  595. ---------------------
  596. a b c d e f
  597. a = Number of link status messages not yet displayed
  598. b = Number of receive frames not yet displayed
  599. c = Number of send frames not yet transmitted
  600. d = Number of transmitted frames not yet acknowledged
  601. e = Number of tries on current operation
  602. f = Link state
  603.     Possible link states are:
  604.      0 = Disconnected
  605.      1 = Link Setup
  606.      2 = Frame Reject
  607.      3 = Disconnect Request
  608.      4 = Information Transfer
  609.      5 = Reject Frame Sent
  610.      6 = Waiting Acknowledgement
  611.      7 = Device Busy
  612.      8 = Remote Device Busy
  613.      9 = Both Devices Busy
  614.     10 = Waiting Acknowledgement and Device Busy
  615.     11 = Waiting Acknowledgement and Remote Busy
  616.     12 = Waiting Acknowledgement and Both Devices Busy
  617.     13 = Reject Frame Sent and Device Busy
  618.     14 = Reject Frame Sent and Remote Busy
  619.     15 = Reject Frame Sent and Both Devices Busy
  620.  
  621. NOTE 1:  Only items a and b are displayed for channel 0.
  622. NOTE 2:  Only states 0 - 4 are possible if version 1 is in use.
  623.  
  624.                        DEFAULT PARAMETERS
  625.                        ==================
  626.      In some instances, it  may  be  desirable  to  have  default
  627. parameters which differ from the standard values.  To allow  easy
  628. access, all default parameters have been placed at the  beginning
  629. of the EPROM.  The following listing defines the layout  of  this
  630. area:
  631.  
  632.      TYPE     VALUE          DESCRIPTION
  633.      ----     -----          -----------
  634.      BYTE      1BH           COMMAND CHARACTER
  635.      BYTE    '      ',60H    SOURCE CALL SIGN (SEE NOTE 1)
  636.      WORD     000AH          HDLC BAUD RATE DIVISOR (SEE NOTE 2)
  637.      BYTE      06H           TERMINAL BAUD RATE
  638.      BYTE      01H           MAXIMUM CONNECTIONS
  639.      BYTE      03H           MONITOR MODE (SEE NOTE 3)
  640.      BYTE      01H           REPEATER DISABLE/ENABLE
  641.      BYTE      10H           REPEATER WAIT (10ms)
  642.      BYTE      1EH           TRANSMITTER DELAY (10ms)
  643.      BYTE      03H           FLOW CONTROL MODE
  644.      BYTE      01H           TRANSMITTER PTT DISABLE/ENABLE
  645.      BYTE      01H           CHANNEL NUMBER
  646.      BYTE      01H           AUTO LINEFEED DISABLE/ENABLE
  647.      BYTE      01H           ECHO COMMAND LINE DISABLE/ENABLE
  648.      BYTE      01H           VERSION 2 INITIATED DISABLE/ENABLE
  649.      BYTE      04H           MAXIMUM UNACKNOWLEDGED FRAMES
  650.      BYTE      0AH           MAXIMUM TRY COUNT
  651.      BYTE      03H           FRAME ACKNOWLEDGE INTERVAL
  652.      BYTE      00H           FAST CLOCK DISABLE/ENABLE
  653.      BYTE      00H           FULL DUPLEX DISABLE/ENABLE
  654.      BYTE      64H           TIMER T2 INTERVAL (10ms)
  655.      WORD     4650H          TIMER T3 INTERVAL (10ms)
  656.      BYTE      F0H           PROTOCOL ID
  657.      BYTE    'CQ    ',60H    UNPROTO CALL SIGN (SEE NOTE 1)
  658.      BYTE      01H           VALIDATE CALL SIGN ENABLE/DISABLE
  659.      BYTE      00H           8-BIT CHARACTER ENABLE/DISABLE
  660.      BYTE      00H           STOP BIT/WORD LENGTH (SEE NOTE 4)
  661.      BYTE      00H           PARITY (SEE NOTE 5)
  662.  
  663.   DISABLE = 00H / ENABLE = 01H
  664.  
  665.  
  666. NOTE 1:  The secondary station id must be shifted  left  one  bit
  667. and or'ed with 60H.
  668.  
  669. NOTE 2:  The  HDLC  baud  rate  divisor  is  computed  using  the
  670. formula:
  671. SLOW CLOCK:     divisor = (14400 / buad rate) - 2
  672. FAST CLOCK:     divisor = (28800 / buad rate) - 2
  673. The HDLC baud rate divisor is stored most significant byte first.
  674.  
  675. NOTE 3:  The monitor mode is composed from the following bits:
  676.      BIT       FRAME
  677.      ---       -----
  678.       0        I frames
  679.       1        UI frames
  680.       2        Supervisory frames
  681.       3        Monitor while connected
  682.       4        Monitor received frames (addressed to)
  683.       5        Monitor transmitted frames (addressed from)
  684.  
  685. NOTE 4:  Stop bit and word length is controlled by the  following
  686. bit assignments:
  687.      BIT 7     STOP BIT
  688.      -----     --------
  689.        0       1 stop bit
  690.        1       2 stop bits
  691.        1       1.5 stop bits (word length=5/parity disabled)
  692.        1       1 stop bit (word length=8/parity enabled)
  693.      BIT 6-5   WORD LENGTH
  694.      -------   -----------
  695.        0 0     8 bits
  696.        0 1     7 bits
  697.        1 0     6 bits
  698.        1 1     5 bits
  699. Bits 4-0 MUST be set to 0.
  700.  
  701. NOTE 5:  Parity is controlled by the following bit assignments:
  702.      BIT 7-6   PARITY CONTROL
  703.      -------   --------------
  704.        0 0     Odd parity transmitted/received
  705.        0 1     Even parity transmitted/received
  706.        1 0     Mark parity transmitted/parity check disabled
  707.        1 1     Space parity transmitted/parity check disabled
  708.      BIT 5     PARITY ENABLE
  709.      -----     -------------
  710.        0       Parity disabled
  711.        1       Parity enabled
  712. Bits 4-0 MUST be set to 0.
  713.  
  714.